silc_compare_timeval returns < 0, 0, > 0 instead of TRUE/FALSE.
[silc.git] / lib / silcutil / unix / silcunixsocketstream.c
index 65047081c1055deb4ba2c8d375693c93383d028c..f3107f39c36a1044401de229ea04a69de7fe01c7 100644 (file)
@@ -150,7 +150,7 @@ int silc_socket_stream_read(SilcStream stream, unsigned char *buf,
   /* If we have passed the rate time limit, set our new time limit,
      and zero the rate limit.  This limits reads per second. */
   silc_gettimeofday(&curtime);
-  if (!silc_compare_timeval(&curtime, &sock->qos->next_limit)) {
+  if (silc_compare_timeval(&curtime, &sock->qos->next_limit) > 0) {
     curtime.tv_sec++;
     sock->qos->next_limit = curtime;
     sock->qos->cur_rate = 0;