Changeset 4ff9961862088bf74ca36f04ae3e34094ec9778f
- Timestamp:
- 09/18/07 17:44:47
(1 year ago)
- Author:
- Rémi Denis-Courmont <rem@videolan.org>
- git-committer:
- Rémi Denis-Courmont <rem@videolan.org> 1190130287 +0000
- git-parent:
[357771f9fee9241d5d9fa0262c4558c3fd57948c]
- git-author:
- Rémi Denis-Courmont <rem@videolan.org> 1190130287 +0000
- Message:
Fix the most common strerror() usages (threads, network, input) - refs #1297
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r2f2ec59 |
r4ff9961 |
|
| 65 | 65 | #include <stdarg.h> |
|---|
| 66 | 66 | |
|---|
| 67 | | #include <string.h> /* strerror() */ |
|---|
| | 67 | #include <string.h> |
|---|
| 68 | 68 | #include <stdio.h> |
|---|
| 69 | 69 | |
|---|
| rf464bb3 |
r4ff9961 |
|
| 64 | 64 | # include <netdb.h> |
|---|
| 65 | 65 | # define net_errno errno |
|---|
| 66 | | # define net_strerror strerror |
|---|
| 67 | 66 | #endif |
|---|
| 68 | 67 | |
|---|
| r8440f6c |
r4ff9961 |
|
| 82 | 82 | /* In case of error : */ |
|---|
| 83 | 83 | unsigned long int i_thread = 0; |
|---|
| 84 | | const char * psz_error = ""; |
|---|
| 85 | 84 | |
|---|
| 86 | 85 | #if defined( PTH_INIT_IN_PTH_H ) |
|---|
| … | … | |
| 127 | 126 | { |
|---|
| 128 | 127 | i_thread = CAST_PTHREAD_TO_INT(pthread_self()); |
|---|
| 129 | | psz_error = strerror(i_result); |
|---|
| | 128 | errno = i_result; |
|---|
| 130 | 129 | } |
|---|
| 131 | 130 | |
|---|
| … | … | |
| 139 | 138 | { |
|---|
| 140 | 139 | msg_Err( p_mutex->p_this, |
|---|
| 141 | | "thread %li: mutex_lock failed at %s:%d (%d:%s)", |
|---|
| 142 | | i_thread, psz_file, i_line, i_result, psz_error ); |
|---|
| | 140 | "thread %li: mutex_lock failed at %s:%d (%d:%m)", |
|---|
| | 141 | i_thread, psz_file, i_line, i_result ); |
|---|
| 143 | 142 | } |
|---|
| 144 | 143 | return i_result; |
|---|
| … | … | |
| 161 | 160 | /* In case of error : */ |
|---|
| 162 | 161 | unsigned long int i_thread = 0; |
|---|
| 163 | | const char * psz_error = ""; |
|---|
| 164 | 162 | |
|---|
| 165 | 163 | #if defined( PTH_INIT_IN_PTH_H ) |
|---|
| … | … | |
| 204 | 202 | { |
|---|
| 205 | 203 | i_thread = CAST_PTHREAD_TO_INT(pthread_self()); |
|---|
| 206 | | psz_error = strerror(i_result); |
|---|
| | 204 | errno = i_result; |
|---|
| 207 | 205 | } |
|---|
| 208 | 206 | |
|---|
| … | … | |
| 216 | 214 | { |
|---|
| 217 | 215 | msg_Err( p_mutex->p_this, |
|---|
| 218 | | "thread %li: mutex_unlock failed at %s:%d (%d:%s)", |
|---|
| 219 | | i_thread, psz_file, i_line, i_result, psz_error ); |
|---|
| | 216 | "thread %li: mutex_unlock failed at %s:%d (%d:%m)", |
|---|
| | 217 | i_thread, psz_file, i_line, i_result ); |
|---|
| 220 | 218 | } |
|---|
| 221 | 219 | |
|---|
| … | … | |
| 247 | 245 | /* In case of error : */ |
|---|
| 248 | 246 | unsigned long int i_thread = 0; |
|---|
| 249 | | const char * psz_error = ""; |
|---|
| 250 | 247 | |
|---|
| 251 | 248 | #if defined( PTH_INIT_IN_PTH_H ) |
|---|
| … | … | |
| 342 | 339 | { |
|---|
| 343 | 340 | i_thread = CAST_PTHREAD_TO_INT(pthread_self()); |
|---|
| 344 | | psz_error = strerror(i_result); |
|---|
| | 341 | errno = i_result; |
|---|
| 345 | 342 | } |
|---|
| 346 | 343 | |
|---|
| … | … | |
| 358 | 355 | { |
|---|
| 359 | 356 | msg_Err( p_condvar->p_this, |
|---|
| 360 | | "thread %li: cond_signal failed at %s:%d (%d:%s)", |
|---|
| 361 | | i_thread, psz_file, i_line, i_result, psz_error ); |
|---|
| | 357 | "thread %li: cond_signal failed at %s:%d (%d:%m)", |
|---|
| | 358 | i_thread, psz_file, i_line, i_result ); |
|---|
| 362 | 359 | } |
|---|
| 363 | 360 | |
|---|
| … | … | |
| 377 | 374 | /* In case of error : */ |
|---|
| 378 | 375 | unsigned long int i_thread = 0; |
|---|
| 379 | | const char * psz_error = ""; |
|---|
| 380 | 376 | |
|---|
| 381 | 377 | #if defined( PTH_INIT_IN_PTH_H ) |
|---|
| … | … | |
| 514 | 510 | if( i_result == ETIMEDOUT ) |
|---|
| 515 | 511 | { |
|---|
| | 512 | errno = ETIMEDOUT; |
|---|
| 516 | 513 | msg_Dbg( p_condvar->p_this, |
|---|
| 517 | 514 | "thread %li: possible condition deadlock " |
|---|
| 518 | | "at %s:%d (%s)", CAST_PTHREAD_TO_INT(pthread_self()), |
|---|
| 519 | | psz_file, i_line, strerror(i_result) ); |
|---|
| | 515 | "at %s:%d (%m)", CAST_PTHREAD_TO_INT(pthread_self()), |
|---|
| | 516 | psz_file, i_line ); |
|---|
| 520 | 517 | |
|---|
| 521 | 518 | i_result = pthread_cond_wait( &p_condvar->cond, &p_mutex->mutex ); |
|---|
| … | … | |
| 529 | 526 | { |
|---|
| 530 | 527 | i_thread = CAST_PTHREAD_TO_INT(pthread_self()); |
|---|
| 531 | | psz_error = strerror(i_result); |
|---|
| | 528 | errno = i_result; |
|---|
| 532 | 529 | } |
|---|
| 533 | 530 | |
|---|
| … | … | |
| 541 | 538 | { |
|---|
| 542 | 539 | msg_Err( p_condvar->p_this, |
|---|
| 543 | | "thread %li: cond_wait failed at %s:%d (%d:%s)", |
|---|
| 544 | | i_thread, psz_file, i_line, i_result, psz_error ); |
|---|
| | 540 | "thread %li: cond_wait failed at %s:%d (%d:%m)", |
|---|
| | 541 | i_thread, psz_file, i_line, i_result ); |
|---|
| 545 | 542 | } |
|---|
| 546 | 543 | |
|---|
| … | … | |
| 564 | 561 | int i_res; |
|---|
| 565 | 562 | unsigned long int i_thread = 0; |
|---|
| 566 | | const char * psz_error = ""; |
|---|
| 567 | 563 | |
|---|
| 568 | 564 | #if defined( PTH_INIT_IN_PTH_H ) |
|---|
| … | … | |
| 589 | 585 | { |
|---|
| 590 | 586 | i_thread = CAST_PTHREAD_TO_INT(pthread_self()); |
|---|
| 591 | | psz_error = strerror(i_res); |
|---|
| | 587 | errno = i_res; |
|---|
| 592 | 588 | } |
|---|
| 593 | 589 | |
|---|
| … | … | |
| 599 | 595 | { |
|---|
| 600 | 596 | msg_Err( p_condvar->p_this, |
|---|
| 601 | | "thread %li: cond_wait failed at %s:%d (%d:%s)", |
|---|
| 602 | | i_thread, psz_file, i_line, i_res, psz_error ); |
|---|
| | 597 | "thread %li: cond_wait failed at %s:%d (%d:%m)", |
|---|
| | 598 | i_thread, psz_file, i_line, i_res ); |
|---|
| 603 | 599 | } |
|---|
| 604 | 600 | |
|---|
| r6144922 |
r4ff9961 |
|
| 459 | 459 | |
|---|
| 460 | 460 | if( err ) |
|---|
| 461 | | msg_Err( p_playlist, "%s: %s", psz_filename, strerror( err ) ); |
|---|
| | 461 | { |
|---|
| | 462 | errno = err; |
|---|
| | 463 | msg_Err( p_playlist, "%s: %m", psz_filename ); |
|---|
| | 464 | } |
|---|
| 462 | 465 | else |
|---|
| 463 | 466 | msg_Dbg( p_playlist, "album art saved to %s\n", psz_filename ); |
|---|
| … | … | |
| 546 | 549 | { |
|---|
| 547 | 550 | if( fwrite( p_attachment->p_data, p_attachment->i_data, 1, f ) != 1 ) |
|---|
| 548 | | msg_Err( p_input, "%s: %s", psz_filename, strerror( errno ) ); |
|---|
| | 551 | msg_Err( p_input, "%s: %m", psz_filename ); |
|---|
| 549 | 552 | else |
|---|
| 550 | 553 | msg_Dbg( p_input, "album art saved to %s\n", psz_filename ); |
|---|
| rb0c5b0a |
r4ff9961 |
|
| 331 | 331 | /* In case of error : */ |
|---|
| 332 | 332 | int i_thread = -1; |
|---|
| 333 | | const char * psz_error = ""; |
|---|
| 334 | 333 | |
|---|
| 335 | 334 | #if defined( PTH_INIT_IN_PTH_H ) |
|---|
| … | … | |
| 368 | 367 | { |
|---|
| 369 | 368 | i_thread = CAST_PTHREAD_TO_INT(pthread_self()); |
|---|
| 370 | | psz_error = strerror(i_result); |
|---|
| | 369 | errno = i_result; |
|---|
| 371 | 370 | } |
|---|
| 372 | 371 | |
|---|
| … | … | |
| 379 | 378 | { |
|---|
| 380 | 379 | msg_Err( p_mutex->p_this, |
|---|
| 381 | | "thread %d: mutex_destroy failed at %s:%d (%d:%s)", |
|---|
| 382 | | i_thread, psz_file, i_line, i_result, psz_error ); |
|---|
| | 380 | "thread %d: mutex_destroy failed at %s:%d (%d:%m)", |
|---|
| | 381 | i_thread, psz_file, i_line, i_result ); |
|---|
| 383 | 382 | } |
|---|
| 384 | 383 | return i_result; |
|---|
| … | … | |
| 501 | 500 | /* In case of error : */ |
|---|
| 502 | 501 | int i_thread = -1; |
|---|
| 503 | | const char * psz_error = ""; |
|---|
| 504 | 502 | |
|---|
| 505 | 503 | #if defined( PTH_INIT_IN_PTH_H ) |
|---|
| … | … | |
| 531 | 529 | { |
|---|
| 532 | 530 | i_thread = CAST_PTHREAD_TO_INT(pthread_self()); |
|---|
| 533 | | psz_error = strerror(i_result); |
|---|
| | 531 | errno = i_result; |
|---|
| 534 | 532 | } |
|---|
| 535 | 533 | |
|---|
| … | … | |
| 542 | 540 | { |
|---|
| 543 | 541 | msg_Err( p_condvar->p_this, |
|---|
| 544 | | "thread %d: cond_destroy failed at %s:%d (%d:%s)", |
|---|
| 545 | | i_thread, psz_file, i_line, i_result, psz_error ); |
|---|
| | 542 | "thread %d: cond_destroy failed at %s:%d (%d:%m)", |
|---|
| | 543 | i_thread, psz_file, i_line, i_result ); |
|---|
| 546 | 544 | } |
|---|
| 547 | 545 | return i_result; |
|---|
| … | … | |
| 666 | 664 | i_policy, ¶m )) ) |
|---|
| 667 | 665 | { |
|---|
| 668 | | msg_Warn( p_this, "couldn't set thread priority (%s:%d): %s", |
|---|
| 669 | | psz_file, i_line, strerror(i_error) ); |
|---|
| | 666 | errno = i_error; |
|---|
| | 667 | msg_Warn( p_this, "couldn't set thread priority (%s:%d): %m", |
|---|
| | 668 | psz_file, i_line ); |
|---|
| 670 | 669 | i_priority = 0; |
|---|
| 671 | 670 | } |
|---|
| … | … | |
| 709 | 708 | else |
|---|
| 710 | 709 | { |
|---|
| 711 | | msg_Err( p_this, "%s thread could not be created at %s:%d (%s)", |
|---|
| 712 | | psz_name, psz_file, i_line, strerror(i_ret) ); |
|---|
| | 710 | errno = i_ret; |
|---|
| | 711 | msg_Err( p_this, "%s thread could not be created at %s:%d (%m)", |
|---|
| | 712 | psz_name, psz_file, i_line ); |
|---|
| 713 | 713 | vlc_mutex_unlock( &p_this->object_lock ); |
|---|
| 714 | 714 | } |
|---|
| … | … | |
| 763 | 763 | i_policy, ¶m )) ) |
|---|
| 764 | 764 | { |
|---|
| 765 | | msg_Warn( p_this, "couldn't set thread priority (%s:%d): %s", |
|---|
| 766 | | psz_file, i_line, strerror(i_error) ); |
|---|
| | 765 | errno = i_error; |
|---|
| | 766 | msg_Warn( p_this, "couldn't set thread priority (%s:%d): %m", |
|---|
| | 767 | psz_file, i_line ); |
|---|
| 767 | 768 | i_priority = 0; |
|---|
| 768 | 769 | } |
|---|
| … | … | |
| 882 | 883 | if( i_ret ) |
|---|
| 883 | 884 | { |
|---|
| 884 | | msg_Err( p_this, "thread_join(%u) failed at %s:%d (%s)", |
|---|
| 885 | | (unsigned int)p_priv->thread_id, psz_file, i_line, |
|---|
| 886 | | strerror(i_ret) ); |
|---|
| | 885 | errno = i_ret; |
|---|
| | 886 | msg_Err( p_this, "thread_join(%u) failed at %s:%d (%m)", |
|---|
| | 887 | (unsigned int)p_priv->thread_id, psz_file, i_line ); |
|---|
| 887 | 888 | } |
|---|
| 888 | 889 | else |
|---|
| r6ee1e19 |
r4ff9961 |
|
| 318 | 318 | if( ferror( file ) ) |
|---|
| 319 | 319 | { |
|---|
| 320 | | msg_Err( p_acl->p_owner, "error reading %s : %s\n", psz_path, |
|---|
| 321 | | strerror( errno ) ); |
|---|
| | 320 | msg_Err( p_acl->p_owner, "error reading %s : %m", psz_path ); |
|---|
| 322 | 321 | goto error; |
|---|
| 323 | 322 | } |
|---|
| … | … | |
| 338 | 337 | if( ptr == NULL ) |
|---|
| 339 | 338 | { |
|---|
| 340 | | msg_Warn( p_acl->p_owner, "skipping overly long line in %s\n", |
|---|
| | 339 | msg_Warn( p_acl->p_owner, "skipping overly long line in %s", |
|---|
| 341 | 340 | psz_path); |
|---|
| 342 | 341 | do |
|---|
| … | … | |
| 346 | 345 | if( ferror( file ) ) |
|---|
| 347 | 346 | { |
|---|
| 348 | | msg_Err( p_acl->p_owner, "error reading %s : %s\n", |
|---|
| 349 | | psz_path, strerror( errno ) ); |
|---|
| | 347 | msg_Err( p_acl->p_owner, "error reading %s : %m", |
|---|
| | 348 | psz_path ); |
|---|
| 350 | 349 | } |
|---|
| 351 | 350 | goto error; |
|---|
| r44cc227 |
r4ff9961 |
|
| 2363 | 2363 | { |
|---|
| 2364 | 2364 | /* This is most likely a bug */ |
|---|
| 2365 | | msg_Err( host, "polling error: %s", strerror (errno)); |
|---|
| | 2365 | msg_Err( host, "polling error: %m" ); |
|---|
| 2366 | 2366 | msleep( 1000 ); |
|---|
| 2367 | 2367 | } |
|---|
| r6ee1e19 |
r4ff9961 |
|
| 89 | 89 | { |
|---|
| 90 | 90 | if (net_errno != EAFNOSUPPORT) |
|---|
| 91 | | msg_Err (p_this, "cannot create socket: %s", |
|---|
| 92 | | net_strerror (net_errno)); |
|---|
| | 91 | msg_Err (p_this, "cannot create socket: %m"); |
|---|
| 93 | 92 | return -1; |
|---|
| 94 | 93 | } |
|---|
| … | … | |
| 149 | 148 | if (fd == -1) |
|---|
| 150 | 149 | { |
|---|
| 151 | | msg_Dbg (p_this, "socket error: %s", net_strerror (net_errno)); |
|---|
| | 150 | msg_Dbg (p_this, "socket error: %m"); |
|---|
| 152 | 151 | continue; |
|---|
| 153 | 152 | } |
|---|
| … | … | |
| 177 | 176 | if (bind (fd, ptr->ai_addr, ptr->ai_addrlen)) |
|---|
| 178 | 177 | { |
|---|
| 179 | | int saved_errno = net_errno; |
|---|
| 180 | | |
|---|
| 181 | 178 | net_Close (fd); |
|---|
| 182 | 179 | #if !defined(WIN32) && !defined(UNDER_CE) |
|---|
| … | … | |
| 191 | 188 | #endif |
|---|
| 192 | 189 | { |
|---|
| 193 | | msg_Err (p_this, "socket bind error (%s)", |
|---|
| 194 | | net_strerror( saved_errno ) ); |
|---|
| | 190 | msg_Err (p_this, "socket bind error (%m)"); |
|---|
| 195 | 191 | continue; |
|---|
| 196 | 192 | } |
|---|
| … | … | |
| 217 | 213 | if (listen (fd, INT_MAX)) |
|---|
| 218 | 214 | { |
|---|
| 219 | | msg_Err (p_this, "socket listen error (%s)", |
|---|
| 220 | | net_strerror (net_errno)); |
|---|
| | 215 | msg_Err (p_this, "socket listen error (%m)"); |
|---|
| 221 | 216 | net_Close (fd); |
|---|
| 222 | 217 | continue; |
|---|
| … | … | |
| 363 | 358 | |
|---|
| 364 | 359 | error: |
|---|
| 365 | | msg_Err (p_this, "Read error: %s", net_strerror (net_errno)); |
|---|
| | 360 | msg_Err (p_this, "Read error: %m"); |
|---|
| 366 | 361 | return i_total ? (ssize_t)i_total : -1; |
|---|
| 367 | 362 | } |
|---|
| … | … | |
| 422 | 417 | { |
|---|
| 423 | 418 | case -1: |
|---|
| 424 | | msg_Err (p_this, "Write error: %s", net_strerror (net_errno)); |
|---|
| | 419 | msg_Err (p_this, "Write error: %m"); |
|---|
| 425 | 420 | goto out; |
|---|
| 426 | 421 | |
|---|
| … | … | |
| 443 | 438 | if (val == -1) |
|---|
| 444 | 439 | { |
|---|
| 445 | | msg_Err (p_this, "Write error: %s", net_strerror (net_errno)); |
|---|
| | 440 | msg_Err (p_this, "Write error: %m"); |
|---|
| 446 | 441 | break; |
|---|
| 447 | 442 | } |
|---|
| re3c88d5 |
r4ff9961 |
|
| 148 | 148 | if( fd == -1 ) |
|---|
| 149 | 149 | { |
|---|
| 150 | | msg_Dbg( p_this, "socket error: %s", strerror( net_errno ) ); |
|---|
| | 150 | msg_Dbg( p_this, "socket error: %m" ); |
|---|
| 151 | 151 | continue; |
|---|
| 152 | 152 | } |
|---|
| … | … | |
| 160 | 160 | if( net_errno != EINPROGRESS ) |
|---|
| 161 | 161 | { |
|---|
| 162 | | msg_Err( p_this, "connection failed: %s", |
|---|
| 163 | | strerror( net_errno ) ); |
|---|
| | 162 | msg_Err( p_this, "connection failed: %m" ); |
|---|
| 164 | 163 | goto next_ai; |
|---|
| 165 | 164 | } |
|---|
| … | … | |
| 200 | 199 | if( ( i_ret == -1 ) && ( net_errno != EINTR ) ) |
|---|
| 201 | 200 | { |
|---|
| 202 | | msg_Err( p_this, "connection polling error: %s", |
|---|
| 203 | | strerror( net_errno ) ); |
|---|
| | 201 | msg_Err( p_this, "connection polling error: %m" ); |
|---|
| 204 | 202 | goto next_ai; |
|---|
| 205 | 203 | } |
|---|
| … | … | |
| 218 | 216 | &i_val_size ) == -1 || i_val != 0 ) |
|---|
| 219 | 217 | { |
|---|
| 220 | | msg_Err( p_this, "connection failed: %s", |
|---|
| 221 | | net_strerror( i_val ) ); |
|---|
| | 218 | msg_Err( p_this, "connection failed: %m" ); |
|---|
| 222 | 219 | goto next_ai; |
|---|
| 223 | 220 | } |
|---|
| … | … | |
| 289 | 286 | if (net_errno != EINTR) |
|---|
| 290 | 287 | { |
|---|
| 291 | | msg_Err (p_this, "poll error: %s", |
|---|
| 292 | | net_strerror (net_errno)); |
|---|
| | 288 | msg_Err (p_this, "poll error: %m"); |
|---|
| 293 | 289 | } |
|---|
| 294 | 290 | return -1; |
|---|
| … | … | |
| 309 | 305 | if (fd == -1) |
|---|
| 310 | 306 | { |
|---|
| 311 | | msg_Err (p_this, "accept failed (%s)", |
|---|
| 312 | | net_strerror (net_errno)); |
|---|
| | 307 | msg_Err (p_this, "accept failed (%m)"); |
|---|
| 313 | 308 | continue; |
|---|
| 314 | 309 | } |
|---|
| r96b7100 |
r4ff9961 |
|
| 125 | 125 | if (fd == -1) |
|---|
| 126 | 126 | { |
|---|
| 127 | | msg_Dbg (obj, "socket error: %s", net_strerror (net_errno)); |
|---|
| | 127 | msg_Dbg (obj, "socket error: %m"); |
|---|
| 128 | 128 | continue; |
|---|
| 129 | 129 | } |
|---|
| … | … | |
| 158 | 158 | if (bind (fd, ptr->ai_addr, ptr->ai_addrlen)) |
|---|
| 159 | 159 | { |
|---|
| 160 | | msg_Err (obj, "socket bind error (%s)", net_strerror (net_errno)); |
|---|
| | 160 | msg_Err (obj, "socket bind error (%m)"); |
|---|
| 161 | 161 | net_Close (fd); |
|---|
| 162 | 162 | continue; |
|---|
| … | … | |
| 205 | 205 | |
|---|
| 206 | 206 | default: |
|---|
| 207 | | msg_Warn( p_this, "%s", strerror( EAFNOSUPPORT ) ); |
|---|
| | 207 | errno = EAFNOSUPPORT; |
|---|
| | 208 | msg_Warn( p_this, "%m" ); |
|---|
| 208 | 209 | return VLC_EGENERIC; |
|---|
| 209 | 210 | } |
|---|
| … | … | |
| 275 | 276 | return 0; |
|---|
| 276 | 277 | |
|---|
| 277 | | msg_Err (p_this, "%s: %s", iface, net_strerror (net_errno)); |
|---|
| | 278 | msg_Err (p_this, "%s: %m", iface); |
|---|
| 278 | 279 | } |
|---|
| 279 | 280 | |
|---|
| … | … | |
| 293 | 294 | return 0; |
|---|
| 294 | 295 | |
|---|
| 295 | | msg_Err (p_this, "%s: %s", addr, net_strerror (net_errno)); |
|---|
| | 296 | msg_Err (p_this, "%s: %m", addr); |
|---|
| 296 | 297 | } |
|---|
| 297 | 298 | } |
|---|
| … | … | |
| 363 | 364 | #endif |
|---|
| 364 | 365 | |
|---|
| 365 | | msg_Err (obj, "cannot join IPv4 multicast group (%s)", |
|---|
| 366 | | net_strerror (net_errno)); |
|---|
| | 366 | msg_Err (obj, "cannot join IPv4 multicast group (%m)"); |
|---|
| 367 | 367 | return -1; |
|---|
| 368 | 368 | } |
|---|
| … | … | |
| 386 | 386 | #endif |
|---|
| 387 | 387 | |
|---|
| 388 | | msg_Err (obj, "cannot join IPv6 any-source multicast group (%s)", |
|---|
| 389 | | net_strerror (net_errno)); |
|---|
| | 388 | msg_Err (obj, "cannot join IPv6 any-source multicast group (%m)"); |
|---|
| 390 | 389 | return -1; |
|---|
| 391 | 390 | } |
|---|
| … | … | |
| 550 | 549 | } |
|---|
| 551 | 550 | |
|---|
| 552 | | msg_Err (obj, "Multicast group join error (%s)", |
|---|
| 553 | | net_strerror (net_errno)); |
|---|
| | 551 | msg_Err (obj, "Multicast group join error (%m)"); |
|---|
| 554 | 552 | |
|---|
| 555 | 553 | if (src != NULL) |
|---|
| … | … | |
| 688 | 686 | else |
|---|
| 689 | 687 | { |
|---|
| 690 | | msg_Warn( p_this, "%s port %d : %s", psz_host, i_port, |
|---|
| 691 | | strerror( errno ) ); |
|---|
| | 688 | msg_Warn( p_this, "%s port %d : %m", psz_host, i_port); |
|---|
| 692 | 689 | net_Close( fd ); |
|---|
| 693 | 690 | continue; |
|---|
| … | … | |
| 804 | 801 | : connect (fd, ptr2->ai_addr, ptr2->ai_addrlen)) |
|---|
| 805 | 802 | { |
|---|
| 806 | | msg_Err (obj, "cannot connect to %s port %d: %s", |
|---|
| 807 | | psz_server, i_server, net_strerror (net_errno)); |
|---|
| | 803 | msg_Err (obj, "cannot connect to %s port %d: %m", |
|---|
| | 804 | psz_server, i_server); |
|---|
| 808 | 805 | continue; |
|---|
| 809 | 806 | } |
|---|
| rd212179 |
r4ff9961 |
|
| 31 | 31 | #include <stdlib.h> /* free() */ |
|---|
| 32 | 32 | #include <stdio.h> /* sprintf() */ |
|---|
| 33 | | #include <string.h> /* strerror() */ |
|---|
| | 33 | #include <string.h> |
|---|
| 34 | 34 | #include <ctype.h> /* tolower(), isxdigit() */ |
|---|
| 35 | 35 | |
|---|
| r7dd2f15 |
r4ff9961 |
|
| 32 | 32 | #include <stdlib.h> /* free() */ |
|---|
| 33 | 33 | #include <stdio.h> /* sprintf() */ |
|---|
| 34 | | #include <string.h> /* strerror() */ |
|---|
| | 34 | #include <string.h> |
|---|
| 35 | 35 | |
|---|
| 36 | 36 | #include <vlc_sout.h> |
|---|