|
|
@ -104,13 +104,17 @@ int main(int argc, char **argv) |
|
|
|
LOGERR("Failed to get a valid line"); |
|
|
|
LOGERR("Failed to get a valid line"); |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
mkstamp(stamp, sizeof(stamp)); |
|
|
|
len = strlen(buf); |
|
|
|
len = strlen(buf); |
|
|
|
if (len < 2) { |
|
|
|
if (len < 2) { |
|
|
|
LOGERR("No message"); |
|
|
|
LOGERR("%s No message", stamp); |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
buf[len - 1] = '\0'; // Strip /n
|
|
|
|
buf[len - 1] = '\0'; // Strip /n
|
|
|
|
mkstamp(stamp, sizeof(stamp)); |
|
|
|
if (buf[0] == '#') { |
|
|
|
|
|
|
|
LOGDEBUG("%s Got comment: %s", stamp, buf); |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
LOGDEBUG("%s Got message: %s", stamp, buf); |
|
|
|
LOGDEBUG("%s Got message: %s", stamp, buf); |
|
|
|
|
|
|
|
|
|
|
|
sockd = open_unix_client(socket_dir); |
|
|
|
sockd = open_unix_client(socket_dir); |
|
|
|