Changeset 169 for trunk/src/sh_portcheck.c
- Timestamp:
- Apr 13, 2008, 9:59:55 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_portcheck.c
r162 r169 384 384 if (ptr->flag != SH_PORT_OPT && ptr->flag != SH_PORT_IGN) 385 385 { 386 snprintf (errbuf, sizeof(errbuf), _(" POLICY [ServiceMissing] port%s:%d/%s (%s)"),386 snprintf (errbuf, sizeof(errbuf), _("port: %s:%d/%s (%s)"), 387 387 ptr->interface, ptr->port, SH_PROTO_STR(proto), 388 388 ptr->service ? ptr->service : check_services(ptr->port, proto)); … … 395 395 SH_MUTEX_LOCK(mutex_thread_nolog); 396 396 sh_error_handle(sh_portchk_severity, FIL__, __LINE__, 0, 397 MSG_PORT_ REPORT, errbuf);397 MSG_PORT_MISS, errbuf); 398 398 SH_MUTEX_UNLOCK(mutex_thread_nolog); 399 399 } … … 497 497 if (!portent) 498 498 { 499 snprintf (errbuf, sizeof(errbuf), _(" POLICY [ServiceNew] port%s:%d/%s (%s)"),499 snprintf (errbuf, sizeof(errbuf), _("port: %s:%d/%s (%s)"), 500 500 inet_ntoa(haddr), port, SH_PROTO_STR(proto), service); 501 501 #ifdef TEST_ONLY … … 505 505 SH_MUTEX_LOCK(mutex_thread_nolog); 506 506 sh_error_handle(sh_portchk_severity, FIL__, __LINE__, 0, 507 MSG_PORT_ REPORT, errbuf);507 MSG_PORT_NEW, errbuf); 508 508 SH_MUTEX_UNLOCK(mutex_thread_nolog); 509 509 #endif … … 515 515 else if (portent->status == SH_PORT_MISS && portent->flag != SH_PORT_IGN) 516 516 { 517 snprintf (errbuf, sizeof(errbuf), _(" POLICY [ServiceRestarted] port %s:%d/%s to %d/%s (%s)"),518 inet_ntoa(haddr), port ent->port, SH_PROTO_STR(proto), port, SH_PROTO_STR(proto), service);517 snprintf (errbuf, sizeof(errbuf), _("port: %s:%d/%s (%s), was %d/%s"), 518 inet_ntoa(haddr), port, SH_PROTO_STR(proto), service, portent->port, SH_PROTO_STR(proto)); 519 519 #ifdef TEST_ONLY 520 520 fprintf(stderr, _("service: %s\n"), errbuf); … … 522 522 SH_MUTEX_LOCK(mutex_thread_nolog); 523 523 sh_error_handle(sh_portchk_severity, FIL__, __LINE__, 0, 524 MSG_PORT_RE PORT, errbuf);524 MSG_PORT_RESTART, errbuf); 525 525 SH_MUTEX_UNLOCK(mutex_thread_nolog); 526 526 #endif … … 530 530 else if (port != portent->port && (-1) != portent->port) 531 531 { 532 snprintf (errbuf, sizeof(errbuf), _(" POLICY [ServicePortSwitch] port %s:%d/%s to %d/%s (%s)"),533 inet_ntoa(haddr), port ent->port, SH_PROTO_STR(proto), port, SH_PROTO_STR(proto), service);532 snprintf (errbuf, sizeof(errbuf), _("port: %s:%d/%s (%s), was %d/%s"), 533 inet_ntoa(haddr), port, SH_PROTO_STR(proto), service, portent->port, SH_PROTO_STR(proto)); 534 534 #ifdef TEST_ONLY 535 535 fprintf(stderr, _("service: %s\n"), errbuf); … … 537 537 SH_MUTEX_LOCK(mutex_thread_nolog); 538 538 sh_error_handle(sh_portchk_severity, FIL__, __LINE__, 0, 539 MSG_PORT_ REPORT, errbuf);539 MSG_PORT_NEWPORT, errbuf); 540 540 SH_MUTEX_UNLOCK(mutex_thread_nolog); 541 541 #endif … … 552 552 if (!portent) 553 553 { 554 snprintf (errbuf, sizeof(errbuf), _(" POLICY [ServiceNew] port%s:%d/%s (%s)"),554 snprintf (errbuf, sizeof(errbuf), _("port: %s:%d/%s (%s)"), 555 555 inet_ntoa(haddr), port, SH_PROTO_STR(proto), check_services(port, proto)); 556 556 #ifdef TEST_ONLY … … 560 560 SH_MUTEX_LOCK(mutex_thread_nolog); 561 561 sh_error_handle(sh_portchk_severity, FIL__, __LINE__, 0, 562 MSG_PORT_ REPORT, errbuf);562 MSG_PORT_NEW, errbuf); 563 563 SH_MUTEX_UNLOCK(mutex_thread_nolog); 564 564 #endif … … 570 570 else if (portent->status == SH_PORT_MISS && portent->flag != SH_PORT_IGN) 571 571 { 572 snprintf (errbuf, sizeof(errbuf), _(" POLICY [ServiceRestarted] port%s:%d/%s (%s)"),572 snprintf (errbuf, sizeof(errbuf), _("port: %s:%d/%s (%s)"), 573 573 inet_ntoa(haddr), port, SH_PROTO_STR(proto), check_services(port, proto)); 574 574 #ifdef TEST_ONLY … … 577 577 SH_MUTEX_LOCK(mutex_thread_nolog); 578 578 sh_error_handle(sh_portchk_severity, FIL__, __LINE__, 0, 579 MSG_PORT_RE PORT, errbuf);579 MSG_PORT_RESTART, errbuf); 580 580 SH_MUTEX_UNLOCK(mutex_thread_nolog); 581 581 #endif
Note:
See TracChangeset
for help on using the changeset viewer.