Explorar el Código

vccd: i must push because i want to test on my server

intirain hace 4 años
padre
commit
c8714a450b
Se han modificado 6 ficheros con 7 adiciones y 6 borrados
  1. 1 1
      Makefile
  2. 1 1
      include/klist.h
  3. 2 2
      include/vcc/version.h
  4. 1 0
      klist.c
  5. 0 2
      main.c
  6. 2 0
      vcc.c

+ 1 - 1
Makefile

@@ -1,6 +1,6 @@
 VCCD_MAJOR 		= 1
 VCCD_MINOR 		= 2
-VCCD_PATCH 		= 0
+VCCD_PATCH 		= 1
 VCCD_STR 		= -stable 
 
 VCCD_COMPILE_TIME 	= $(shell date)

+ 1 - 1
include/klist.h

@@ -30,7 +30,7 @@ struct klist_node {
 	void 			*data;
 	char 			*usrname;
 	struct klist_node 	*sending;
-	struct vcc_request 	*reading;
+	void		 	*reading;
 	int 			size_did_read;
 
 	struct klist_node 	*next, *prev;

+ 2 - 2
include/vcc/version.h

@@ -1,2 +1,2 @@
-#define VCCD_VERSION "vccd 1.2.0 Sun Mar 13 14:25:22 CST 2022 root"
-#define VCCD_SYMVER "vccd 1.2.0 Sun Mar 13 14:25:22 CST 2022 root"
+#define VCCD_VERSION "vccd 1.2.1 Sun Mar 13 14:37:17 CST 2022 root"
+#define VCCD_SYMVER "vccd 1.2.1 Sun Mar 13 14:37:17 CST 2022 root"

+ 1 - 0
klist.c

@@ -43,6 +43,7 @@ void klist_init(struct klist_node *head) {
 	head->value = 0;
 	head->data = NULL;
 	head->sending = NULL;
+	head->size_did_read = 0;
 	head->usrname = NULL;
 
 	return;

+ 0 - 2
main.c

@@ -219,8 +219,6 @@ int main(int argc, const char **argv) {
 					continue;
 				}
 
-				vcc_log("%d bytes i read. \n", size);
-
 				vcc_new_msg(fds[i].fd, buf, size);
 
 				free(buf);

+ 2 - 0
vcc.c

@@ -277,6 +277,8 @@ int vcc_new_msg(int fd, void *packet, int size) {
 	req = n->reading;
 	msg = req->msg;
 
+	vcc_log("Okay. \n");
+
 	if (unlikely(ntohl(req->magic) != VCC_MAGIC)) {
 		vcc_log("--- bad magic number from %d\n", fd);