Skip to contentSkip to conversation

Bug fix: delete the reader entry after queueing an event, not before.

PATCH In review Jeremy White 4 participants 5 messages Jan 19, 2015 – Jan 23, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Bug fix: delete the reader entry after queueing an event, not before.

As far as I can tell, the vreader_remove_reader function is not presently in use anywhere; I have an upcoming patch set that uses it.

---
 libcacard/vreader.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
libcacard/vreader.c +1 -1
index 0315dd8..8b10d6a 100644
@@ -529,8 +529,8 @@ vreader_remove_reader(VReader *reader)
     }
     vreader_dequeue(vreader_list, current_entry);
     vreader_list_unlock();
-    vreader_list_entry_delete(current_entry);
     vevent_queue_vevent(vevent_new(VEVENT_READER_REMOVE, reader, NULL));
+    vreader_list_entry_delete(current_entry);
     return VREADER_OK;
 }
 
Signature · 1 line
1.7.10.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 23 lines · Jeremy White

As far as I can tell, the vreader_remove_reader function is not presently in use anywhere; I have an upcoming patch set that uses it.

---
 libcacard/vreader.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
libcacard/vreader.c +1 -2
index 0315dd8..8b10d6a 100644
@@ -529,8 +529,8 @@ vreader_remove_reader(VReader *reader)
     }
     vreader_dequeue(vreader_list, current_entry);
     vreader_list_unlock();
-    vreader_list_entry_delete(current_entry);
     vevent_queue_vevent(vevent_new(VEVENT_READER_REMOVE, reader, NULL));
+    vreader_list_entry_delete(current_entry);
     return VREADER_OK;
 }
 
--
Quoted 3 lines

1.7.10.4

Signature · 1 line
Marc-André Lureau
#2 lore raw
Quoted 23 lines · Marc-André Lureau
Quoted 22 lines · Jeremy White

As far as I can tell, the vreader_remove_reader function is not presently in use anywhere; I have an upcoming patch set that uses it.

---
 libcacard/vreader.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
libcacard/vreader.c +1 -1
index 0315dd8..8b10d6a 100644
@@ -529,8 +529,8 @@ vreader_remove_reader(VReader *reader)
     }
     vreader_dequeue(vreader_list, current_entry);
     vreader_list_unlock();
-    vreader_list_entry_delete(current_entry);
     vevent_queue_vevent(vevent_new(VEVENT_READER_REMOVE, reader, NULL));
+    vreader_list_entry_delete(current_entry);
     return VREADER_OK;
 }
 
Quoted 6 lines
Quoted 4 lines

--
1.7.10.4

Gerd, are you maintaining libcacard nowadays? If so, can you add an entry to MAINTAINERS? (And if not, perhaps Marc-André could maintain it...)

Paolo

#3 lore raw

Hi,

Quoted 4 lines
Quoted 1 line

Gerd, are you maintaining libcacard nowadays? If so, can you add an entry to MAINTAINERS? (And if not, perhaps Marc-André could maintain it...)

Well, I know next to nothing about libcacard, and I'd very much prefer if someone who knows this better that me maintains it, especially as this is security-sensitive stuff.

The best I could do would be "Odd Fixes" mode for libcacard, i.e. collect patches from the list, glace over for obviously broken bits, do a pull request now and then ...

cheers,
Gerd

#4 lore raw
Quoted 7 lines · Gerd Hoffmann

Hi,

Quoted 4 lines
Quoted 1 line

Gerd, are you maintaining libcacard nowadays? If so, can you add an entry to MAINTAINERS? (And if not, perhaps Marc-André could maintain it...)

Quoted 7 lines

Well, I know next to nothing about libcacard, and I'd very much prefer if someone who knows this better that me maintains it, especially as this is security-sensitive stuff.

The best I could do would be "Odd Fixes" mode for libcacard, i.e. collect patches from the list, glace over for obviously broken bits, do a pull request now and then ...

Jeremy is obviously doing more than odd fixes though!

Paolo