Skip to content

Commit

Permalink
correct ICQ struct prefix
Browse files Browse the repository at this point in the history
ICQ structs were prefixed with the incorrect SNAC food group ID 0x0F,
when they should have been prefixed with 0x15.
  • Loading branch information
mk6i committed Aug 26, 2024
1 parent bbe48be commit 2c9cf04
Show file tree
Hide file tree
Showing 5 changed files with 652 additions and 652 deletions.
2 changes: 1 addition & 1 deletion foodgroup/icq.go
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ func (s ICQService) reply(ctx context.Context, sess *state.Session, message wire
FoodGroup: wire.ICQ,
SubGroup: wire.ICQDBReply,
},
Body: wire.SNAC_0x0F_0x02_DBReply{
Body: wire.SNAC_0x15_0x02_DBReply{
TLVRestBlock: wire.TLVRestBlock{
TLVList: wire.TLVList{
wire.NewTLV(wire.ICQTLVTagsMetadata, message),
Expand Down
54 changes: 27 additions & 27 deletions foodgroup/icq_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func TestICQService_FindByDetails(t *testing.T) {
FoodGroup: wire.ICQ,
SubGroup: wire.ICQDBReply,
},
Body: wire.SNAC_0x0F_0x02_DBReply{
Body: wire.SNAC_0x15_0x02_DBReply{
TLVRestBlock: wire.TLVRestBlock{
TLVList: wire.TLVList{
wire.NewTLV(wire.ICQTLVTagsMetadata, wire.ICQMessageReplyEnvelope{
Expand Down Expand Up @@ -168,7 +168,7 @@ func TestICQService_FindByDetails(t *testing.T) {
FoodGroup: wire.ICQ,
SubGroup: wire.ICQDBReply,
},
Body: wire.SNAC_0x0F_0x02_DBReply{
Body: wire.SNAC_0x15_0x02_DBReply{
TLVRestBlock: wire.TLVRestBlock{
TLVList: wire.TLVList{
wire.NewTLV(wire.ICQTLVTagsMetadata, wire.ICQMessageReplyEnvelope{
Expand Down Expand Up @@ -308,7 +308,7 @@ func TestICQService_FindByEmail(t *testing.T) {
FoodGroup: wire.ICQ,
SubGroup: wire.ICQDBReply,
},
Body: wire.SNAC_0x0F_0x02_DBReply{
Body: wire.SNAC_0x15_0x02_DBReply{
TLVRestBlock: wire.TLVRestBlock{
TLVList: wire.TLVList{
wire.NewTLV(wire.ICQTLVTagsMetadata, wire.ICQMessageReplyEnvelope{
Expand Down Expand Up @@ -444,7 +444,7 @@ func TestICQService_FindByUIN(t *testing.T) {
FoodGroup: wire.ICQ,
SubGroup: wire.ICQDBReply,
},
Body: wire.SNAC_0x0F_0x02_DBReply{
Body: wire.SNAC_0x15_0x02_DBReply{
TLVRestBlock: wire.TLVRestBlock{
TLVList: wire.TLVList{
wire.NewTLV(wire.ICQTLVTagsMetadata, wire.ICQMessageReplyEnvelope{
Expand Down Expand Up @@ -602,7 +602,7 @@ func TestICQService_FindByWhitePages(t *testing.T) {
FoodGroup: wire.ICQ,
SubGroup: wire.ICQDBReply,
},
Body: wire.SNAC_0x0F_0x02_DBReply{
Body: wire.SNAC_0x15_0x02_DBReply{
TLVRestBlock: wire.TLVRestBlock{
TLVList: wire.TLVList{
wire.NewTLV(wire.ICQTLVTagsMetadata, wire.ICQMessageReplyEnvelope{
Expand Down Expand Up @@ -639,7 +639,7 @@ func TestICQService_FindByWhitePages(t *testing.T) {
FoodGroup: wire.ICQ,
SubGroup: wire.ICQDBReply,
},
Body: wire.SNAC_0x0F_0x02_DBReply{
Body: wire.SNAC_0x15_0x02_DBReply{
TLVRestBlock: wire.TLVRestBlock{
TLVList: wire.TLVList{
wire.NewTLV(wire.ICQTLVTagsMetadata, wire.ICQMessageReplyEnvelope{
Expand Down Expand Up @@ -834,7 +834,7 @@ func TestICQService_FullUserInfo(t *testing.T) {
FoodGroup: wire.ICQ,
SubGroup: wire.ICQDBReply,
},
Body: wire.SNAC_0x0F_0x02_DBReply{
Body: wire.SNAC_0x15_0x02_DBReply{
TLVRestBlock: wire.TLVRestBlock{
TLVList: wire.TLVList{
wire.NewTLV(wire.ICQTLVTagsMetadata, wire.ICQMessageReplyEnvelope{
Expand Down Expand Up @@ -878,7 +878,7 @@ func TestICQService_FullUserInfo(t *testing.T) {
FoodGroup: wire.ICQ,
SubGroup: wire.ICQDBReply,
},
Body: wire.SNAC_0x0F_0x02_DBReply{
Body: wire.SNAC_0x15_0x02_DBReply{
TLVRestBlock: wire.TLVRestBlock{
TLVList: wire.TLVList{
wire.NewTLV(wire.ICQTLVTagsMetadata, wire.ICQMessageReplyEnvelope{
Expand Down Expand Up @@ -919,7 +919,7 @@ func TestICQService_FullUserInfo(t *testing.T) {
FoodGroup: wire.ICQ,
SubGroup: wire.ICQDBReply,
},
Body: wire.SNAC_0x0F_0x02_DBReply{
Body: wire.SNAC_0x15_0x02_DBReply{
TLVRestBlock: wire.TLVRestBlock{
TLVList: wire.TLVList{
wire.NewTLV(wire.ICQTLVTagsMetadata, wire.ICQMessageReplyEnvelope{
Expand All @@ -945,7 +945,7 @@ func TestICQService_FullUserInfo(t *testing.T) {
FoodGroup: wire.ICQ,
SubGroup: wire.ICQDBReply,
},
Body: wire.SNAC_0x0F_0x02_DBReply{
Body: wire.SNAC_0x15_0x02_DBReply{
TLVRestBlock: wire.TLVRestBlock{
TLVList: wire.TLVList{
wire.NewTLV(wire.ICQTLVTagsMetadata, wire.ICQMessageReplyEnvelope{
Expand All @@ -971,7 +971,7 @@ func TestICQService_FullUserInfo(t *testing.T) {
FoodGroup: wire.ICQ,
SubGroup: wire.ICQDBReply,
},
Body: wire.SNAC_0x0F_0x02_DBReply{
Body: wire.SNAC_0x15_0x02_DBReply{
TLVRestBlock: wire.TLVRestBlock{
TLVList: wire.TLVList{
wire.NewTLV(wire.ICQTLVTagsMetadata, wire.ICQMessageReplyEnvelope{
Expand Down Expand Up @@ -1011,7 +1011,7 @@ func TestICQService_FullUserInfo(t *testing.T) {
FoodGroup: wire.ICQ,
SubGroup: wire.ICQDBReply,
},
Body: wire.SNAC_0x0F_0x02_DBReply{
Body: wire.SNAC_0x15_0x02_DBReply{
TLVRestBlock: wire.TLVRestBlock{
TLVList: wire.TLVList{
wire.NewTLV(wire.ICQTLVTagsMetadata, wire.ICQMessageReplyEnvelope{
Expand Down Expand Up @@ -1040,7 +1040,7 @@ func TestICQService_FullUserInfo(t *testing.T) {
FoodGroup: wire.ICQ,
SubGroup: wire.ICQDBReply,
},
Body: wire.SNAC_0x0F_0x02_DBReply{
Body: wire.SNAC_0x15_0x02_DBReply{
TLVRestBlock: wire.TLVRestBlock{
TLVList: wire.TLVList{
wire.NewTLV(wire.ICQTLVTagsMetadata, wire.ICQMessageReplyEnvelope{
Expand Down Expand Up @@ -1087,7 +1087,7 @@ func TestICQService_FullUserInfo(t *testing.T) {
FoodGroup: wire.ICQ,
SubGroup: wire.ICQDBReply,
},
Body: wire.SNAC_0x0F_0x02_DBReply{
Body: wire.SNAC_0x15_0x02_DBReply{
TLVRestBlock: wire.TLVRestBlock{
TLVList: wire.TLVList{
wire.NewTLV(wire.ICQTLVTagsMetadata, wire.ICQMessageReplyEnvelope{
Expand Down Expand Up @@ -1251,7 +1251,7 @@ func TestICQService_OfflineMsgReq(t *testing.T) {
FoodGroup: wire.ICQ,
SubGroup: wire.ICQDBReply,
},
Body: wire.SNAC_0x0F_0x02_DBReply{
Body: wire.SNAC_0x15_0x02_DBReply{
TLVRestBlock: wire.TLVRestBlock{
TLVList: wire.TLVList{
wire.NewTLV(wire.ICQTLVTagsMetadata, wire.ICQMessageReplyEnvelope{
Expand Down Expand Up @@ -1283,7 +1283,7 @@ func TestICQService_OfflineMsgReq(t *testing.T) {
FoodGroup: wire.ICQ,
SubGroup: wire.ICQDBReply,
},
Body: wire.SNAC_0x0F_0x02_DBReply{
Body: wire.SNAC_0x15_0x02_DBReply{
TLVRestBlock: wire.TLVRestBlock{
TLVList: wire.TLVList{
wire.NewTLV(wire.ICQTLVTagsMetadata, wire.ICQMessageReplyEnvelope{
Expand Down Expand Up @@ -1315,7 +1315,7 @@ func TestICQService_OfflineMsgReq(t *testing.T) {
FoodGroup: wire.ICQ,
SubGroup: wire.ICQDBReply,
},
Body: wire.SNAC_0x0F_0x02_DBReply{
Body: wire.SNAC_0x15_0x02_DBReply{
TLVRestBlock: wire.TLVRestBlock{
TLVList: wire.TLVList{
wire.NewTLV(wire.ICQTLVTagsMetadata, wire.ICQMessageReplyEnvelope{
Expand Down Expand Up @@ -1438,7 +1438,7 @@ func TestICQService_SetAffiliations(t *testing.T) {
FoodGroup: wire.ICQ,
SubGroup: wire.ICQDBReply,
},
Body: wire.SNAC_0x0F_0x02_DBReply{
Body: wire.SNAC_0x15_0x02_DBReply{
TLVRestBlock: wire.TLVRestBlock{
TLVList: wire.TLVList{
wire.NewTLV(wire.ICQTLVTagsMetadata, wire.ICQMessageReplyEnvelope{
Expand Down Expand Up @@ -1546,7 +1546,7 @@ func TestICQService_SetEmails(t *testing.T) {
FoodGroup: wire.ICQ,
SubGroup: wire.ICQDBReply,
},
Body: wire.SNAC_0x0F_0x02_DBReply{
Body: wire.SNAC_0x15_0x02_DBReply{
TLVRestBlock: wire.TLVRestBlock{
TLVList: wire.TLVList{
wire.NewTLV(wire.ICQTLVTagsMetadata, wire.ICQMessageReplyEnvelope{
Expand Down Expand Up @@ -1649,7 +1649,7 @@ func TestICQService_SetBasicInfo(t *testing.T) {
FoodGroup: wire.ICQ,
SubGroup: wire.ICQDBReply,
},
Body: wire.SNAC_0x0F_0x02_DBReply{
Body: wire.SNAC_0x15_0x02_DBReply{
TLVRestBlock: wire.TLVRestBlock{
TLVList: wire.TLVList{
wire.NewTLV(wire.ICQTLVTagsMetadata, wire.ICQMessageReplyEnvelope{
Expand Down Expand Up @@ -1760,7 +1760,7 @@ func TestICQService_SetInterests(t *testing.T) {
FoodGroup: wire.ICQ,
SubGroup: wire.ICQDBReply,
},
Body: wire.SNAC_0x0F_0x02_DBReply{
Body: wire.SNAC_0x15_0x02_DBReply{
TLVRestBlock: wire.TLVRestBlock{
TLVList: wire.TLVList{
wire.NewTLV(wire.ICQTLVTagsMetadata, wire.ICQMessageReplyEnvelope{
Expand Down Expand Up @@ -1880,7 +1880,7 @@ func TestICQService_SetMoreInfo(t *testing.T) {
FoodGroup: wire.ICQ,
SubGroup: wire.ICQDBReply,
},
Body: wire.SNAC_0x0F_0x02_DBReply{
Body: wire.SNAC_0x15_0x02_DBReply{
TLVRestBlock: wire.TLVRestBlock{
TLVList: wire.TLVList{
wire.NewTLV(wire.ICQTLVTagsMetadata, wire.ICQMessageReplyEnvelope{
Expand Down Expand Up @@ -1952,7 +1952,7 @@ func TestICQService_SetPermissions(t *testing.T) {
FoodGroup: wire.ICQ,
SubGroup: wire.ICQDBReply,
},
Body: wire.SNAC_0x0F_0x02_DBReply{
Body: wire.SNAC_0x15_0x02_DBReply{
TLVRestBlock: wire.TLVRestBlock{
TLVList: wire.TLVList{
wire.NewTLV(wire.ICQTLVTagsMetadata, wire.ICQMessageReplyEnvelope{
Expand Down Expand Up @@ -2029,7 +2029,7 @@ func TestICQService_SetUserNotes(t *testing.T) {
FoodGroup: wire.ICQ,
SubGroup: wire.ICQDBReply,
},
Body: wire.SNAC_0x0F_0x02_DBReply{
Body: wire.SNAC_0x15_0x02_DBReply{
TLVRestBlock: wire.TLVRestBlock{
TLVList: wire.TLVList{
wire.NewTLV(wire.ICQTLVTagsMetadata, wire.ICQMessageReplyEnvelope{
Expand Down Expand Up @@ -2135,7 +2135,7 @@ func TestICQService_SetWorkInfo(t *testing.T) {
FoodGroup: wire.ICQ,
SubGroup: wire.ICQDBReply,
},
Body: wire.SNAC_0x0F_0x02_DBReply{
Body: wire.SNAC_0x15_0x02_DBReply{
TLVRestBlock: wire.TLVRestBlock{
TLVList: wire.TLVList{
wire.NewTLV(wire.ICQTLVTagsMetadata, wire.ICQMessageReplyEnvelope{
Expand Down Expand Up @@ -2235,7 +2235,7 @@ func TestICQService_ShortUserInfo(t *testing.T) {
FoodGroup: wire.ICQ,
SubGroup: wire.ICQDBReply,
},
Body: wire.SNAC_0x0F_0x02_DBReply{
Body: wire.SNAC_0x15_0x02_DBReply{
TLVRestBlock: wire.TLVRestBlock{
TLVList: wire.TLVList{
wire.NewTLV(wire.ICQTLVTagsMetadata, wire.ICQMessageReplyEnvelope{
Expand Down Expand Up @@ -2328,7 +2328,7 @@ func TestICQService_XMLReqData(t *testing.T) {
FoodGroup: wire.ICQ,
SubGroup: wire.ICQDBReply,
},
Body: wire.SNAC_0x0F_0x02_DBReply{
Body: wire.SNAC_0x15_0x02_DBReply{
TLVRestBlock: wire.TLVRestBlock{
TLVList: wire.TLVList{
wire.NewTLV(wire.ICQTLVTagsMetadata, wire.ICQMessageReplyEnvelope{
Expand Down
2 changes: 1 addition & 1 deletion server/oscar/handler/icq.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ type ICQHandler struct {
}

func (rt ICQHandler) DBQuery(ctx context.Context, sess *state.Session, inFrame wire.SNACFrame, r io.Reader, rw oscar.ResponseWriter) error {
inBody := wire.SNAC_0x0F_0x02_BQuery{}
inBody := wire.SNAC_0x15_0x02_BQuery{}
if err := wire.UnmarshalBE(&inBody, r); err != nil {
return err
}
Expand Down
Loading

0 comments on commit 2c9cf04

Please sign in to comment.