Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DownloadAttach无法下载自己发送的图片 #252

Open
x7yue opened this issue Oct 12, 2024 · 1 comment
Open

DownloadAttach无法下载自己发送的图片 #252

x7yue opened this issue Oct 12, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@x7yue
Copy link

x7yue commented Oct 12, 2024

描述这个 bug
当你试图下载一个自己发送的图片时会下载失败
wcf-client-rust issues

wcf日志

[2024-10-12 12:56:18.694] [debug] [WCF] [funcs.cpp::257::DownloadAttach] path: 
[2024-10-12 12:56:18.694] [error] [WCF] [rpc_server.cpp::1043::RunServer] create_directory: 系统找不到指定的路径。: "" 

debug发现

   QWORD type = GET_QWORD(buff + 0x38);

获取的值未一个很大的值,猜测 buff 里的内容并不是预期的内容

有一个想法是

   if (GetLocalIdandDbidx(id, &localId, &dbIdx) != 0) {
       LOG_ERROR("Failed to get localId, Please check id: {}", to_string(id));
       return status;
   }

GetLocalIdandDbidx 后的一些操作都是为了找到那块应该是原消息的 buff
最终目的是获取消息的 type

是否可以在 GetLocalIdandDbidx 查数据库的时候就直接在数据库里面拿到 type 不需要再费劲拿 buff

 string sql = "SELECT type localId FROM MSG WHERE MsgSvrID=" + to_string(id) + ";";
@x7yue x7yue added the bug Something isn't working label Oct 12, 2024
@x7yue
Copy link
Author

x7yue commented Oct 12, 2024

描述这个 bug 当你试图下载一个自己发送的图片时会下载失败 wcf-client-rust issues

wcf日志

[2024-10-12 12:56:18.694] [debug] [WCF] [funcs.cpp::257::DownloadAttach] path: 
[2024-10-12 12:56:18.694] [error] [WCF] [rpc_server.cpp::1043::RunServer] create_directory: 系统找不到指定的路径。: "" 

debug发现

   QWORD type = GET_QWORD(buff + 0x38);

获取的值未一个很大的值,猜测 buff 里的内容并不是预期的内容

有一个想法是

   if (GetLocalIdandDbidx(id, &localId, &dbIdx) != 0) {
       LOG_ERROR("Failed to get localId, Please check id: {}", to_string(id));
       return status;
   }

GetLocalIdandDbidx 后的一些操作都是为了找到那块应该是原消息的 buff 最终目的是获取消息的 type

是否可以在 GetLocalIdandDbidx 查数据库的时候就直接在数据库里面拿到 type 不需要再费劲拿 buff

 string sql = "SELECT type localId FROM MSG WHERE MsgSvrID=" + to_string(id) + ";";

试了一下似乎可以。提个pr先 #253

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant