{"action":"closed","issue":{"url":"https://api.github.com/repos/sisoputnfrba/foro/issues/661","repository_url":"https://api.github.com/repos/sisoputnfrba/foro","labels_url":"https://api.github.com/repos/sisoputnfrba/foro/issues/661/labels{/name}","comments_url":"https://api.github.com/repos/sisoputnfrba/foro/issues/661/comments","events_url":"https://api.github.com/repos/sisoputnfrba/foro/issues/661/events","html_url":"https://github.com/sisoputnfrba/foro/issues/661","id":224601054,"number":661,"title":"Consulta sobre list_get() - list.h","user":{"login":"CDNievas","id":16874674,"avatar_url":"https://avatars2.githubusercontent.com/u/16874674?v=3","gravatar_id":"","url":"https://api.github.com/users/CDNievas","html_url":"https://github.com/CDNievas","followers_url":"https://api.github.com/users/CDNievas/followers","following_url":"https://api.github.com/users/CDNievas/following{/other_user}","gists_url":"https://api.github.com/users/CDNievas/gists{/gist_id}","starred_url":"https://api.github.com/users/CDNievas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CDNievas/subscriptions","organizations_url":"https://api.github.com/users/CDNievas/orgs","repos_url":"https://api.github.com/users/CDNievas/repos","events_url":"https://api.github.com/users/CDNievas/events{/privacy}","received_events_url":"https://api.github.com/users/CDNievas/received_events","type":"User","site_admin":false},"labels":[{"id":250745443,"url":"https://api.github.com/repos/sisoputnfrba/foro/labels/herramientas-eclipse-git-vms-etc","name":"herramientas-eclipse-git-vms-etc","color":"fbca04","default":false},{"id":250745234,"url":"https://api.github.com/repos/sisoputnfrba/foro/labels/programacion-c","name":"programacion-c","color":"0052cc","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-04-26T21:12:54Z","updated_at":"2017-05-02T23:20:54Z","closed_at":"2017-05-02T23:20:53Z","body":"Tengo una consulta sobre el funcionamiento de la funcion list_get de las commons.\r\nEl codigo es el siguiente:\r\n\r\n```\r\ntypdef struct{\r\n\tint socket;\r\n\tint ocupado;\r\n} strSCKT;\r\n\r\nt_list * lista\r\nint i = 0;\r\nstrSCKT * str;\r\n\r\nif (list_size(lista) == 0){\r\n\tprint(\"NULL \\n\");\r\n} else {\r\n\tstr = list_get(lista,i);\r\n\tprintf(\"%d \\n\", (*str).socket);\r\n\tprintf(\"%d \\n\", str->socket);\r\n}\r\n```\r\n\r\nSegun leí lo que hace list_get es devolverte un puntero al data (la estructura creada por mi y puesta en la lista con list_add) a partir de un índice.\r\nPero al mostrarlo por pantalla me imprime cualquier cosa (en ambos print), reconoce que es una estructura con esos campos pero no imprime lo que es debido.\r\n\r\nQueria saber una posible solucion.\r\n\r\nMuchas gracias\r\n\r\n"}}
{"actor":{"display_login":"CDNievas"}}