diff options
-rw-r--r-- | main.c | 16 | ||||
-rw-r--r-- | tls.c | 1 |
2 files changed, 7 insertions, 10 deletions
@@ -132,16 +132,14 @@ void *client_loop(void *ign) { uint64_t old_offset = offset; if (offset < msg_len) { while (offset < msg_len) { - if (full_msg.data[offset] == ':') { - argc++; + argc++; + + if (full_msg.data[offset] == ':') break; - } while (offset < msg_len && full_msg.data[offset] != ' ') offset++; - argc++; - while (offset < msg_len && full_msg.data[offset] == ' ') offset++; } @@ -369,16 +367,14 @@ int main(void) { uint64_t old_offset = offset; if (offset < msg_len) { while (offset < msg_len) { - if (full_msg.data[offset] == ':') { - argc++; + argc++; + + if (full_msg.data[offset] == ':') break; - } while (offset < msg_len && full_msg.data[offset] != ' ') offset++; - argc++; - while (offset < msg_len && full_msg.data[offset] == ' ') offset++; } @@ -27,6 +27,7 @@ // OTHER DEALINGS IN THE SOFTWARE. #include <gnutls/gnutls.h> +#include <gnutls/x509.h> #include <sys/socket.h> #include <sys/types.h> #include <arpa/inet.h> |