Changeset 206 for trunk/src/sh_portcheck.c
- Timestamp:
- Jan 8, 2009, 10:08:45 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_portcheck.c
r180 r206 137 137 138 138 extern char * sh_port2proc_query(int proto, struct in_addr * saddr, int sport, 139 char * user, size_t userlen);139 unsigned long * pid, char * user, size_t userlen); 140 140 extern int sh_port2proc_prepare(); 141 141 … … 515 515 { 516 516 char * path; 517 unsigned long qpid; 517 518 char user[USER_MAX]; 518 519 … … 523 524 inet_ntoa(haddr), port, SH_PROTO_STR(proto), service); 524 525 #else 525 path = sh_port2proc_query(proto, &haddr, port, user, sizeof(user));526 path = sh_port2proc_query(proto, &haddr, port, &qpid, user, sizeof(user)); 526 527 SH_MUTEX_LOCK(mutex_thread_nolog); 527 528 sh_error_handle(sh_portchk_severity, FIL__, __LINE__, 0, 528 MSG_PORT_NEW, errbuf, path, user);529 MSG_PORT_NEW, errbuf, path, qpid, user); 529 530 SH_MUTEX_UNLOCK(mutex_thread_nolog); 530 531 SH_FREE(path); … … 538 539 { 539 540 char * path; 541 unsigned long qpid; 540 542 char user[USER_MAX]; 541 543 … … 545 547 fprintf(stderr, _("service: %s\n"), errbuf); 546 548 #else 547 path = sh_port2proc_query(proto, &haddr, port, user, sizeof(user));549 path = sh_port2proc_query(proto, &haddr, port, &qpid, user, sizeof(user)); 548 550 SH_MUTEX_LOCK(mutex_thread_nolog); 549 551 sh_error_handle(sh_portchk_severity, FIL__, __LINE__, 0, 550 MSG_PORT_RESTART, errbuf, path, user);552 MSG_PORT_RESTART, errbuf, path, qpid, user); 551 553 SH_MUTEX_UNLOCK(mutex_thread_nolog); 552 554 SH_FREE(path); … … 558 560 { 559 561 char * path; 562 unsigned long qpid; 560 563 char user[USER_MAX]; 561 564 … … 565 568 fprintf(stderr, _("service: %s\n"), errbuf); 566 569 #else 567 path = sh_port2proc_query(proto, &haddr, port, user, sizeof(user));570 path = sh_port2proc_query(proto, &haddr, port, &qpid, user, sizeof(user)); 568 571 SH_MUTEX_LOCK(mutex_thread_nolog); 569 572 sh_error_handle(sh_portchk_severity, FIL__, __LINE__, 0, 570 MSG_PORT_NEWPORT, errbuf, path, user);573 MSG_PORT_NEWPORT, errbuf, path, qpid, user); 571 574 SH_MUTEX_UNLOCK(mutex_thread_nolog); 572 575 SH_FREE(path); … … 585 588 { 586 589 char * path; 590 unsigned long qpid; 587 591 char user[USER_MAX]; 588 592 … … 593 597 inet_ntoa(haddr), port, SH_PROTO_STR(proto), check_services(port, proto)); 594 598 #else 595 path = sh_port2proc_query(proto, &haddr, port, user, sizeof(user));599 path = sh_port2proc_query(proto, &haddr, port, &qpid, user, sizeof(user)); 596 600 SH_MUTEX_LOCK(mutex_thread_nolog); 597 601 sh_error_handle(sh_portchk_severity, FIL__, __LINE__, 0, 598 MSG_PORT_NEW, errbuf, path, user);602 MSG_PORT_NEW, errbuf, path, qpid, user); 599 603 SH_MUTEX_UNLOCK(mutex_thread_nolog); 600 604 SH_FREE(path); … … 608 612 { 609 613 char * path; 614 unsigned long qpid; 610 615 char user[USER_MAX]; 611 616 … … 615 620 fprintf(stderr, _("port : %s\n"), errbuf); 616 621 #else 617 path = sh_port2proc_query(proto, &haddr, port, user, sizeof(user));622 path = sh_port2proc_query(proto, &haddr, port, &qpid, user, sizeof(user)); 618 623 SH_MUTEX_LOCK(mutex_thread_nolog); 619 624 sh_error_handle(sh_portchk_severity, FIL__, __LINE__, 0, 620 MSG_PORT_RESTART, errbuf, path, user);625 MSG_PORT_RESTART, errbuf, path, qpid, user); 621 626 SH_MUTEX_UNLOCK(mutex_thread_nolog); 622 627 SH_FREE(path);
Note:
See TracChangeset
for help on using the changeset viewer.