Skip to Content.
Sympa Menu

ndt-dev - [ndt-dev] [ndt] r944 committed - Replace _LN constants with strlen().

Subject: NDT-DEV email list created

List archive

[ndt-dev] [ndt] r944 committed - Replace _LN constants with strlen().


Chronological Thread 
  • From:
  • To:
  • Subject: [ndt-dev] [ndt] r944 committed - Replace _LN constants with strlen().
  • Date: Thu, 20 Feb 2014 20:06:02 +0000

Revision: 944
Author:

Date: Thu Feb 20 20:05:44 2014 UTC
Log: Replace _LN constants with strlen().
http://code.google.com/p/ndt/source/detail?r=944

Modified:
/branches/Issue122/src/protocol.h
/branches/Issue122/src/web100srv.c

=======================================
--- /branches/Issue122/src/protocol.h Fri Feb 14 15:28:42 2014 UTC
+++ /branches/Issue122/src/protocol.h Thu Feb 20 20:05:44 2014 UTC
@@ -26,23 +26,18 @@

#define SRV_QUEUE_TEST_STARTS_NOW 0
#define SRV_QUEUE_TEST_STARTS_NOW_STR "0"
-#define SRV_QUEUE_TEST_STARTS_NOW_STR_LN 4

#define SRV_QUEUE_SERVER_FAULT 9977
#define SRV_QUEUE_SERVER_FAULT_STR "9977"
-#define SRV_QUEUE_SERVER_FAULT_STR_LN 4

#define SRV_QUEUE_SERVER_BUSY 9988
#define SRV_QUEUE_SERVER_BUSY_STR "9988"
-#define SRV_QUEUE_SERVER_BUSY_STR_LN 4

#define SRV_QUEUE_HEARTBEAT 9990
#define SRV_QUEUE_HEARTBEAT_STR "9990"
-#define SRV_QUEUE_HEARTBEAT_STR_LN 4

#define SRV_QUEUE_SERVER_BUSY_60s 9999
#define SRV_QUEUE_SERVER_BUSY_60s_STR "9999"
-#define SRV_QUEUE_SERVER_BUSY_60s_STR_LN 4

/*
#define TEST_NONE 0
=======================================
--- /branches/Issue122/src/web100srv.c Fri Feb 14 15:28:42 2014 UTC
+++ /branches/Issue122/src/web100srv.c Thu Feb 20 20:05:44 2014 UTC
@@ -789,7 +789,7 @@
// send "keep-alive" SRV_QUEUE message to client and expect a response
retcode = send_msg(tmp_ptr->ctlsockfd, SRV_QUEUE,
SRV_QUEUE_HEARTBEAT_STR,
- SRV_QUEUE_HEARTBEAT_STR_LN);
+ strlen(SRV_QUEUE_HEARTBEAT_STR));
log_println(6,
"send_msg() returned %d during zombie check on client %d",
retcode, tmp_ptr->pid);
@@ -2029,7 +2029,7 @@
// indicate server waiting in queue
send_msg(head_ptr->ctlsockfd, SRV_QUEUE,
SRV_QUEUE_SERVER_BUSY_STR,
- SRV_QUEUE_SERVER_BUSY_STR_LN);
+ strlen(SRV_QUEUE_SERVER_BUSY_STR));
shutdown(head_ptr->ctlsockfd, SHUT_WR);
close(head_ptr->ctlsockfd);
tpid = head_ptr->pid;
@@ -2050,7 +2050,7 @@
/* send_msg(head_ptr->ctlsockfd, SRV_QUEUE, "9977", 4); */
send_msg(head_ptr->ctlsockfd, SRV_QUEUE,
SRV_QUEUE_SERVER_BUSY_STR,
- SRV_QUEUE_SERVER_BUSY_STR_LN);
+ strlen(SRV_QUEUE_SERVER_BUSY_STR));
shutdown(head_ptr->ctlsockfd, SHUT_WR);
close(head_ptr->ctlsockfd);
tpid = head_ptr->pid;
@@ -2086,7 +2086,7 @@
// boot the client
send_msg(head_ptr->ctlsockfd, SRV_QUEUE,
SRV_QUEUE_SERVER_BUSY_STR,
- SRV_QUEUE_SERVER_BUSY_STR_LN);
+ strlen(SRV_QUEUE_SERVER_BUSY_STR));
shutdown(head_ptr->ctlsockfd, SHUT_WR);
close(head_ptr->ctlsockfd);
tpid = head_ptr->pid;
@@ -2295,7 +2295,7 @@
"Please try again later.", chld_pid);
send_msg(ctlsockfd, SRV_QUEUE,
SRV_QUEUE_SERVER_BUSY_STR,
- SRV_QUEUE_SERVER_BUSY_STR_LN);
+ strlen(SRV_QUEUE_SERVER_BUSY_STR));
close(chld_pipe[0]);
close(chld_pipe[1]);
shutdown(ctlsockfd, SHUT_WR);
@@ -2378,7 +2378,7 @@
/* send_msg(new_child->ctlsockfd, SRV_QUEUE, "9944", 4); */
send_msg(new_child->ctlsockfd, SRV_QUEUE,
SRV_QUEUE_SERVER_BUSY_STR,
- SRV_QUEUE_SERVER_BUSY_STR_LN);
+ strlen(SRV_QUEUE_SERVER_BUSY_STR));
close(chld_pipe[1]);
shutdown(new_child->ctlsockfd, SHUT_WR);
close(new_child->ctlsockfd);


  • [ndt-dev] [ndt] r944 committed - Replace _LN constants with strlen()., ndt, 02/20/2014

Archive powered by MHonArc 2.6.16.

Top of Page